<template>
	<view class="uni_box home">
		<!-- <navbar title='合作加盟'>
		</navbar> -->
		<view class="zhanone">
			<image class="zljm" src="/static/img/zljm.png"></image>
			<view class="zhanview">
				<text class="zhname">战略合作</text>
				<view class="lmiaoshu">
					<view class="mview">
						<image class="icon_zj" src="/static/img/icon_zj.png"/>
						<text class="dai">纯风险代理的办案专家</text>
					</view>
					<view class="mview">
						<image class="icon_zj" src="/static/img/icon_fw.png"/>
						<text class="dai">法务团队2000人在线受理</text>
					</view>
					<view class="mview">
						<image class="icon_zj" src="/static/img/icon_ais.png"/>
						<text class="dai">中国头部互联网科技AI法务咨询平台</text>
					</view>
				</view>
			</view>
		</view>
		<view class="content">
			<view class="antwo">
				<text class="tiantit">您的需求是</text>
				<view class="xview">
					<view class="xitem " :class="demandindex==index?'xtctive':''" v-for="(item,index) in demand" :key="index" @click="getClass(index)">{{item}}</view>
				</view>
				<view class="anlist">
					<text class="antit"><text class="xing">*</text>联系人：</text>
					<u-input v-model="name" type="text" :border="false" placeholder="请输入"/>
				</view>
				<view class="anlist">
					<text class="antit"><text class="xing">*</text>联系方式：</text>
					<u-input v-model="phone" type="text" :border="false" placeholder="请输入"/>
				</view>
				<view class="anlist">
					<text class="antit"><text class="xing">*</text>企业名称：</text>
					<u-input v-model="qiye" type="text" :border="false" placeholder="请输入"/>
				</view>
				<view class="anlist neiview">
					<text class="antit nei">公司信息：</text>
					<view class="wenben">
						<u-input v-model="company" type="textarea" :border="false" placeholder="请输入"/>
					</view>
					<text class="tmiao">成为我们的一员，不仅可以离法务服务更近一步，同时也将拥有更多可能性的行业选择，打击违法行为，建立属于自己的团队。</text>
				</view>
			</view>
			
			

			<view class="botview">
				<view class="botbtn" @click="gettijiao">提交信息</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name:'',
				phone:'',
				company:'',
				qiye:'',
				info:{},
				demand:[],
				demandindex:0
			}
		},
		onLoad() {
		},
		onShow() {
			this.getfjoinus();//信息
		},
		methods: {
			
			async gettijiao(){
				let res = await this.$u.api.userjoinus({
					name:this.name,
					phone:this.phone,
					company:this.company,
					demand:this.demandindex
				});
				this.$u.toast("提交成功");
				this.name = ''
				this.phone = ''
				this.company = ''
			},
			async getfjoinus(){
				let res = await this.$u.api.joinus({
				});
				this.info = res
				this.demand = res.demand
				this.demandindex = Object.keys(res.demand)[0]
				// console.log(this.demandindex)
			},
			getClass(index){
				this.demandindex =index
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #F5F5F5;
	}
	.zhanone{
		height: 460rpx;
		position: relative;
		.zljm{
			position: absolute;
			width: 100%;
			height: 100%;
		}
		.zhanview{
			padding: 30rpx;
			position: relative;
			width: 100%;
			height: 100%;
			.zhname{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 50rpx;
				color: #111111;
			}
			.lmiaoshu{
				display: flex;
				flex-direction: column;
				margin: 20rpx 0 20rpx;
				.mview{
					display: flex;
					flex-direction: row;
					align-items: center;
					margin-bottom: 15rpx;
					.icon_zj{
						width: 28rpx;
						height: 28rpx;
						margin-right: 10rpx;
					}
					.dai{
						font-family: PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #496EE7;
					}
				}
			}
		}
	}
	.xing{
		font-weight: 500;
		font-size: 28rpx;
		color: #F42020;
		display: inline-block;
	}
	.content{
		// background-color: #F5F5F5;
		padding-bottom: 150rpx;
		position: relative;
		margin-top: -175rpx;
		.anone{
			background: #FFFFFF;
			border-radius: 20rpx;
			margin: 20rpx 30rpx 0;
			padding: 30rpx;
			display: flex;
			flex-direction: column;
			.anoneitem{
				display: flex;
				flex-direction: row;
				align-items: center;
			}
			.icon_aj{
				margin-right: 7rpx;
				width: 40rpx;
				height: 40rpx;
			}
			.antit{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #111111;
			}
		}
		.guview{
			background: #F2F4FA;
			border-radius: 10rpx;
			padding: 30rpx;
			margin: 30rpx 0 0;
			.guname{
				display: block;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #333333;
				margin-bottom: 15rpx;
			}
			.guval{
				display: inline-block;
				margin-left: 10rpx;
				font-weight: bold;
				font-size: 28rpx;
				color: #3E65E5;
			}
			.guname:last-child{
				margin-bottom: 0;
			}
		}
		.antwo{
			background: #FFFFFF;
			border-radius: 20rpx;
			margin: 30rpx 30rpx 0;
			padding: 30rpx;
			display: flex;
			flex-direction: column;
			.anlist{
				display: flex;
				flex-direction: row;
				align-items: center;
				padding: 20rpx 0;
				border-bottom: 1rpx solid #EEEEEE;
				.antit{
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #111111;
				}
			}
			.neiview{
				flex-direction: column;
				align-items: flex-start;
				border-bottom: none;
				
			}
			.wenben{
				height: 200rpx;
				background: #F5F5F5;
				border-radius: 20rpx;
				padding: 30rpx;
				width: 100%;
				margin-top: 30rpx;
			}
			.tmiao{
				font-weight: 400;
				font-size: 24rpx;
				color: #333333;
				display: block;
				margin-top: 20rpx;
			}

		}

		.matit{
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #333333;
			display: block;
			margin: 40rpx 30rpx;
		}
		.nodata{
			margin: 130rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			.img_kztz{
				width: 540rpx;
				height: 440rpx;
				margin-bottom: 10rpx;
			}
			text{
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #999999;
			}
		}
		.lview{
			padding: 0 30rpx;
			.items{
				margin-bottom: 20rpx;
				padding: 30rpx;
				background: #FFFFFF;
				border-radius: 10rpx;
				.ione{
					border-bottom: 1rpx solid #EEEEEE;
					padding-bottom: 20rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 32rpx;
					color: #51565D;
				}
				.itwo{
					margin: 25rpx 0;
					.tiname{
						display: block;
						margin-bottom: 15rpx;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 28rpx;
						color: #666666;
					}
					.tival{
						color: #3E65E5;
					}
				}
				.cahview{
					padding-top: 30rpx;
					border-top: 1rpx solid #EEEEEE;
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: flex-end;
					.chabtn{
						width: 160rpx;
						height: 60rpx;
						background: #3E65E5;
						border-radius: 10rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 28rpx;
						color: #FFFFFF;

					}
				}
			}
		}
		.botview{
			position: relative;
			width: 90%;
			height: 120rpx;
			// background-color: #fff;
			bottom: 0;
			display: flex;
			// margin-top: 50rpx;
			margin: 50rpx auto;
			align-items: center;
			justify-content: center;
			.botbtn{
				height: 88rpx;
				background: #3E65E5;
				border-radius: 20rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: #FFFFFF;
				width: 94%;
			}
		}
	}
	.xview{
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		margin-top: 30rpx;
		.xitem{
			margin: 0 20rpx 15rpx 0;
			background: #F5F5F5;
			border-radius: 5rpx;
			padding: 17rpx 24rpx;
			font-weight: 500;
			font-size: 28rpx;
			color: #999999;
			min-width: 200rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}
		.xtctive{
			border: 1px solid #557CFA;
			color: #3E65E5;
		}
	}
	.tiantit{
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #111111;
	}
</style>
